package com.fang.gateway.security.mapper;

import com.fang.gateway.entity.bo.UserRoleBo;
import com.fang.gateway.entity.po.TbNetDisLoginRecord;
import com.fang.gateway.entity.po.TbNetDisUser;
import com.fang.gateway.security.entity.bo.WebFluxAuthoritiesBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @Author Bernie_fang
 * @Date 2024/12/11 23:05
 **/
public interface AuthorityMapper {

    List<UserRoleBo> queryUserRoleByUserID(@Param("userId") String userId);

    TbNetDisUser findUserByUsername(@Param("username") String username);

    List<String> queryUserAuthorityByUserId(@Param("userId") String userId);

    List<WebFluxAuthoritiesBo> queryUserAuthorityByUserIdForFlux(@Param("userId") String userId);

    List<String> queryUserAuthorityByUsername(@Param("username") String username);

    int insertLoginRecord(@Param("loginRecord")TbNetDisLoginRecord loginRecord);

    List<String> findUrlAuthorityByUrl(@Param("path") String path);

}
